//
//  TKXmppManager.h
//  XmppTest
//  用于管理xmpp的连接，用户列表，用户状态处理和单聊的消息收发 
//  Created by liupm on 15/9/17.
//  Copyright (c) 2015年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>

//是否登录
#define TKIMLoginFlag  @"TKIMLoginFlag"

@interface TKIMManager : TKIMXmppMoudle<TKIMChatProtocol,TKIMRoomProtocol,
                                                                            TKIMLoginProtocol,TKIMUserProtocol,
                                                                            TKIMNotifyProtocol,
                                                                            TKIMChatUtilProtocol,TKIMManagerDelegate>

@property(nonatomic,strong) TKIMUser *loginUser;//登录用户
@property(assign,nonatomic) BOOL isLoginOut;//是否退出登录
@property(assign,readonly) BOOL isConnect;//是否连接了服务器
@property(assign,readonly) BOOL isAuthenticate;//用户是否验证成功
@property(assign,readonly) BOOL isConnecting;//是否正在连接服务器


/**
 *  @Author lpm, 15-09-18 13:09:42
 *
 *  @brief  单例
 *
 *  @return
 */
+(TKIMManager *)shareInstance;


/**
 *  @Author lpm, 16-11-14 17:11:46
 *
 *  @brief  初始化sdk不带socket连接
 *
 *  @param userName
 */
-(void)initSDKWithoutSocket:(NSString *)userName;


/**
 *  @Author lpm, 15-05-11 11:05:06
 *
 *  注册推送TOKEN
 *
 *  @param tokenString
 */
-(void)registerDeviceToken;


/**
 *  @Author lpm, 15-12-01 15:12:08
 *
 *  @brief  修改推送偏好
 *
 *  @param type
 */
-(void)modifyPushPreferences;


/**
 *  @Author lpm, 16-12-12 10:12:08
 *
 *  @brief  上传推送偏好
 *
 *  @param username      登录用户名
 *  @param deviceToken   推送TOKEN
 *  @param isShowContent 是否显示推送内容
 *  @param isOpenSound   是否打开推送声音
 *  @param IsOpenNightMode   是否打开夜间不提醒
 *  @param extDic        其它扩展字段，没有可不传
 *  @param callBack      回调
 */
-(void)uploadPushPreferences:(NSString *)username token:(NSString *)deviceToken isShowContent:(BOOL)isShowContent isOpenSound:(BOOL)isOpenSound IsOpenNightMode:(BOOL)IsOpenNightMode param:(NSMutableDictionary *)extDic callBack:(TKIMCallBack)callBack;


/**
 *  @Author lpm, 16-03-02 15:03:12
 *
 *  @brief  获得http请求的sessionkey
 *
 *  @return
 */
+(NSString *)getHttpSessionKey;


/**
 *  @Author lpm, 16-03-02 15:03:12
 *
 *  @brief  获得xmpp服务器域名
 *
 *  @return
 */
-(NSString *)getXmppDomain;



@end

